[[% macro sectionToc(page) %]]
<ul>
[[% for child in page.parent.children %]]
[[% if child.title != page.title %]]
[[% if child.is_page %]]
<li><a href="/[[ child.url ]]">[[ child.title ]]</a></li>
[[% elif child.is_section %]]
<li><a href="/[[ child.children[0].url ]]">[[ child.title ]]</a></li>
[[% elif child.is_link %]]
<li><a href="[[ child.url ]]">[[ child.title ]]</a></li>
[[% endif %]]
[[% endif %]]
[[% endfor %]]
</ul>
[[% endmacro %]]
